package com.vision.core.cl.ui;

import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.container.LayoutData;
import com.sencha.gxt.widget.core.client.container.MarginData;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;

/**
 * Provides instances of commonly used {@link LayoutData}.
 * 
 * @author Mark
 *
 */
public class LayoutDataFactory {
	
	public static MarginData margin0() {
		return new MarginData(0);
	}
	
	public static MarginData margin1() {
		return new MarginData(1);
	}
	
	public static MarginData margin5() {
		return new MarginData(5);
	}
	
	public static Margins margins0() {
		return new Margins(0);
	}
	
	public static Margins margins1() {
		return new Margins(1);
	}
	
	public static Margins margins5() {
		return new Margins(5);
	}
	
	// Width 1
	
	public static VerticalLayoutData verticalFillWidth() {
		return new VerticalLayoutData(1, -1);
	}
	
	public static VerticalLayoutData verticalFillWidth5() {
		return new VerticalLayoutData(1, -1, margins5());
	}
	
	// Width -1
	
	public static VerticalLayoutData verticalDefault() {
		return new VerticalLayoutData(-1, -1);
	}
	
	public static VerticalLayoutData verticalDefaultM5() {
		return new VerticalLayoutData(-1, -1, margins5());
	}
	
	// Width 400
	
	public static VerticalLayoutData verticalW400() {
		return new VerticalLayoutData(400, -1);
	}
	
	public static VerticalLayoutData verticalW400M5() {
		return new VerticalLayoutData(400, -1, margins5());
	}
	
	// Multi-line
	
	public static VerticalLayoutData verticalW400H60() {
		return new VerticalLayoutData(400, 60);
	}
	
	public static VerticalLayoutData verticalW400H60M5() {
		return new VerticalLayoutData(400, 60, margins5());
	}
	
	public static VerticalLayoutData verticalMultiLineText() {
		return new VerticalLayoutData(1, 60);
	}

}
